
let str = `{"datatype":112,"dataval":"{\"devid\":\"LDYJ210101\",\"state\":2,\"val\":-1.09,\"time\":\"2022-01-18 14:39:20\"}"}
                    {"datatype":112,"dataval":"{\"devid\":\"LDYJ210102\",\"state\":2,\"val\":3.09,\"time\":\"2022-01-18 14:39:20\"}"}
                    {"datatype":112,"dataval":"{\"devid\":\"LDYJ210103\",\"state\":2,\"val\":-2.09,\"time\":\"2022-01-18 14:39:20\"}"}
                    {"datatype":112,"dataval":"{\"devid\":\"LDYJ210104\",\"state\":2,\"val\":-3.09,\"time\":\"2022-01-18 14:39:21\"}"}`

//要求转换成JS可用的dataval数组

// 答案


